package com.offcn.webui.service;

import com.offcn.dycommon.response.AppResponse;
import com.offcn.webui.config.FeignConfig;
import com.offcn.webui.service.impl.ProjectServiceFeignException;
import com.offcn.webui.vo.resp.ProjectDetailVo;
import com.offcn.webui.vo.resp.ProjectVo;
import com.offcn.webui.vo.resp.ReturnPayConfirmVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @Auther: yao
 * @Date: 2020/10/28 10:33
 * @Description:  项目模块服务调用接口
 */
@FeignClient(value = "SCWPROJECT",configuration = FeignConfig.class,fallback = ProjectServiceFeignException.class)
public interface ProjectServiceFeign {

    @GetMapping("/project/findAllProject")
    public AppResponse<List<ProjectVo>> findAllProject();


    @GetMapping("/project/findProjectById")
    public AppResponse<ProjectDetailVo> findProjectById(@RequestParam("projectId") Integer projectId) ;

    @GetMapping("/project/returns/info/{returnId}")
    public AppResponse<ReturnPayConfirmVo> findTReturnById(@PathVariable(name="returnId") Integer returnId);

}
